gtk/gtkoptionmenu.c make option menus work when some of the menuitems are
authorGMT 1998 Austin Donnelly <austin@greenend.org.uk>
Sun, 1 Nov 1998 21:10:44 +0000 (21:10 +0000)
committerAustin Donnelly <austin@src.gnome.org>
Sun, 1 Nov 1998 21:10:44 +0000 (21:10 +0000)
Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>

* gtk/gtkoptionmenu.c
* gtk/gtkmenushell.c: make option menus work when some of the
menuitems are hidden - previously, option menu would popup too
high.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmenushell.c
gtk/gtkoptionmenu.c

index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index ec2d41c0c9d35aac637a768c9955c1cba3729d42..f930308c067f075eb40975cdd37d30e1ac29cb39 100644 (file)
@@ -1,3 +1,10 @@
+Sun Nov  1 21:00:06 GMT 1998  Austin Donnelly  <austin@greenend.org.uk>
+
+       * gtk/gtkoptionmenu.c
+       * gtk/gtkmenushell.c: make option menus work when some of the
+       menuitems are hidden - previously, option menu would popup too
+       high.
+
 1998-10-31  Raja R Harinath  <harinath@cs.umn.edu>
 
        * gtk/gtkfeatures.h.in: Remove `#pragma }'.
index a6a3bb20df932db136645233e4aa9072714b583d..ad909662116228f4fbbda87acd43fe73a891e4b3 100644 (file)
@@ -868,7 +868,9 @@ gtk_menu_shell_move_selected (GtkMenuShell  *menu_shell,
        {
          node = node->next;
          while (node != start_node && 
-                (!node || !GTK_WIDGET_SENSITIVE (node->data)))
+                (!node ||
+                 !GTK_WIDGET_SENSITIVE (node->data) ||
+                 !GTK_WIDGET_VISIBLE (node->data) ))
            {
              if (!node)
                node = menu_shell->children;
@@ -880,7 +882,9 @@ gtk_menu_shell_move_selected (GtkMenuShell  *menu_shell,
        {
          node = node->prev;
          while (node != start_node &&
-                (!node || !GTK_WIDGET_SENSITIVE (node->data)))
+                (!node ||
+                 !GTK_WIDGET_SENSITIVE (node->data) ||
+                 !GTK_WIDGET_VISIBLE (node->data) ))
            {
              if (!node)
                node = g_list_last (menu_shell->children);
index aadbc7e15580b0a487128ec3bad793692066fcdf..6f520156f30ec4723f592de4d7c9de04d1b48fee 100644 (file)
@@ -637,7 +637,9 @@ gtk_option_menu_position (GtkMenu  *menu,
       if (active == child)
        break;
 
-      menu_ypos -= child->allocation.height;
+      if (GTK_WIDGET_VISIBLE (child))
+       menu_ypos -= child->allocation.height;
+
       children = children->next;
     }